import Global from './global';

const DOMAIN = {
  // api接口常量
  DEV: {
    LOCAL: 'http://localhost:8899'
  },
  TEST: {
    LOCAL: ''
  },
  PRO: {
    LOCAL: ''
  }
}

const API = {
  LOCAL_TEST: '/api'
}

function Api(API_KEY) {
  const DOMAIN_KEY = api.split('_')[0];
  return [Global.ENV === 'DEV' ? '' : DOMAIN[Global.ENV][DOMAIN_KEY] || Global.API, API[API_KEY]].join('');
}

export default Api;
